<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!--上传页面统一界面-->

<c:set var="ckfinder_readonly" value="true" />
<c:if test="${isCanSaveAndOpen}">
	<c:set var="ckfinder_readonly" value="false" />
</c:if>

<div class="panel panel-default panelborder">
	<div class="panel-heading">
		<img src="${ctxStatic}/images/sd/icon54.png" /><span>附件 </span>
		<c:choose>
			<c:when test="${ckfinder_readonly}">
				<img src="${ctxStatic}/images/sd/icon93.png" class="upload" title="上传" />
			</c:when>
			<c:otherwise>
				<a href="javascript:void(0);" id="upload">
					<img src="${ctxStatic}/images/sd/icon93.png" class="upload" title="上传" />
				</a>
			</c:otherwise>
		</c:choose>
	</div>
	<div class="panel-body">
			<!-- 加载后必须在页面初始化files，代码提交后，会根据notMyFiles和myFiles拼接files的值 -->
			<input type="hidden" name="files" value="">
			<form:hidden id="notMyFiles" path="notMyFiles" htmlEscape="false" class="input-xlarge" />
			<sys:ckfinder id="" input="notMyFiles" type="files" uploadPath="${param.uploadPath}"
				selectMultiple="true" readonly="true" />
			<form:hidden id="myFiles" path="myFiles" htmlEscape="false" class="input-xlarge" />
			<sys:ckfinder id="upload" input="myFiles" type="files" uploadPath="${param.uploadPath}"
				selectMultiple="true" cssClass="hide" />
	</div>
</div>

<script>
	$("#upload").click(function() {
		$("#uploadUpload").click();
	});
</script>
